package cn.wolfcode.service.impl;

import cn.wolfcode.entity.Hisrinkinglist;
import cn.wolfcode.mapper.HisrinkinglistMapper;
import cn.wolfcode.qo.NewsQuery;
import cn.wolfcode.service.IHisrinkinglistService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author dou
 * @since 2023-04-14
 */
@Service
public class HisrinkinglistServiceImpl extends ServiceImpl<HisrinkinglistMapper, Hisrinkinglist> implements IHisrinkinglistService {

    @Autowired
    private HisrinkinglistMapper hisrinkinglistMapper;
    @Override
    public Page<Hisrinkinglist> queryPage(NewsQuery qo) {
        Page<Hisrinkinglist> pageParam =new Page<>();
        pageParam.setCurrent(qo.getCurrent());
        pageParam.setSize(qo.getSize());
        QueryWrapper<Hisrinkinglist> qw=new QueryWrapper<>();
        return hisrinkinglistMapper.selectPage(pageParam,qw);

    }

    @Override
    public void insert(Hisrinkinglist hisrinkinglist) {
        hisrinkinglist.insert();
    }
}
